﻿
namespace WS.EKA.UI.Business
{
    public interface IPush
    {
        void AddReceive(IReceive target);
        void RemoveReceive(IReceive target);
        /// <summary>
        /// 向指定的客户端push数据
        /// </summary>
        /// <typeparam name="Model"></typeparam>
        /// <param name="m"></param>
        /// <param name="type"></param>
        void Push<Model>(Model m,WebSocketClientType type);
        /// <summary>
        /// 向所有客户端push数据
        /// </summary>
        /// <typeparam name="Model"></typeparam>
        /// <param name="m"></param>
        void Push<Model>(Model m);
    }

    public interface IReceive : ISign
    {
        void Receive<Model>(Model m);
    }
}